import { post } from '@/request/http'
import store from '@/store'

// 获取 账单管理  账单列表 查询数据
export const getCustomerSelectService = () =>
  post(
    '/FTKJWLHYPT/SysResultsFees/getClientList',
    {
      Data: {
        Parameters: {
          FTKJWLHYPT: {

          }
        },
      }
    }
  )

// 获取 协议  查询数据
export const getAgreeListService = (data) =>
  post(
    '/FTKJWLHYPT/SysResultsFees/getTmsConsultativesList',
    {
      Data: {
        Parameters: {
          FTKJWLHYPT: {
            conCltId: data.conCltId,
            startTime: data.startTime,
            endTime: data.endTime,
            conFltId: store.state.user.FLT_UUID_DX_H,
          }
        },
        Orderbys: {},
        PageIndexs: {
          FTKJWLHYPT: data.PageIndexs
        },
        PageSizes: {
          FTKJWLHYPT: data.PageSizes
        }
      }
    }
  )

// 获取 协议  新增
export const addAgreeListService = (data) =>
  post(
    '/FTKJWLHYPT/SysResultsFees/addTmsConsultatives',
    {
      Data: {
        Parameters: {
          FTKJWLHYPT: {
            conCltId: data.conCltId,
            conSigntm: data.conSigntm,
            conProperty: data.conProperty,
            conEffsttm: data.conEffsttm,
            conEffedtm: data.conEffedtm,
            conContent: data.conContent,
            conFltId: store.state.user.FLT_UUID_DX_H,
            conInsertuser: store.state.user.USR_CODE_DX_H,
          }
        },
      }
    }
  )

// 获取 协议  编辑
export const editAgreeListService = (data) =>
  post(
    '/FTKJWLHYPT/SysResultsFees/editTmsConsultatives',
    {
      Data: {
        Parameters: {
          FTKJWLHYPT: {
            conId: data.conId,
            conCltId: data.conCltId,
            conSigntm: data.conSigntm,
            conProperty: data.conProperty,
            conEffsttm: data.conEffsttm,
            conEffedtm: data.conEffedtm,
            conContent: data.conContent,
            conFltId: store.state.user.FLT_UUID_DX_H,
            conInsertuser: store.state.user.USR_CODE_DX_H,
            conLstupduser: store.state.user.USR_CODE_DX_H,
          }
        },
      }
    }
  )

// 获取 协议  删除
export const delAgreeListService = (data) =>
  post(
    '/FTKJWLHYPT/SysResultsFees/delTmsConsultatives',
    {
      Data: {
        Parameters: {
          FTKJWLHYPT: {
            conId: data.conId
          }
        },
      }
    }
  )

// 获取 协议费率 费目查询
export const getFeeNumService = () =>
  post(
    '/FTKJWLHYPT/SysResultsFees/getConsulativePriceList',
    {
      Data: {
        Parameters: {
          FTKJWLHYPT: {
            chpFltId: store.state.user.FLT_UUID_DX_H,
          }
        },
      }
    }
  )

// 获取 协议费率 查询
export const getAgreeRateService = (data) =>
  post(
    '/FTKJWLHYPT/SysResultsFees/getConsultativeChargesList',
    {
      Data: {
        Parameters: {
          FTKJWLHYPT: {
            cchConId: data.cchConId,
            cchFltId: store.state.user.FLT_UUID_DX_H,
          }
        },
      }
    }
  )

// 获取 协议费率 新增
export const addAgreeRateService = (data) =>
  post(
    '/FTKJWLHYPT/SysResultsFees/addConsultativeChargesList',
    {
      Data: {
        Parameters: {
          FTKJWLHYPT: {
            cchConId: data.cchConId,
            cchChpId: data.cchChpId,
            cchDiscount: data.cchDiscount,
            cchSttm: data.cchSttm,
            cchEdtm: data.cchEdtm,
            cchPayCurrency: data.cchPayCurrency,
            cchSettlemd: data.cchSettlemd,
            cchRemark: data.cchRemark,
            cchFltId: store.state.user.FLT_UUID_DX_H,
            cchInsertuser: store.state.user.USR_CODE_DX_H,
          }
        },
      }
    }
  )

// 获取 协议费率 编辑
export const editAgreeRateService = (data) =>
  post(
    '/FTKJWLHYPT/SysResultsFees/editConsultativeChargesList',
    {
      Data: {
        Parameters: {
          FTKJWLHYPT: {
            cchId: data.cchId,
            cchConId: data.cchConId,
            cchChpId: data.cchChpId,
            cchDiscount: data.cchDiscount,
            cchSttm: data.cchSttm,
            cchEdtm: data.cchEdtm,
            cchPayCurrency: data.cchPayCurrency,
            cchSettlemd: data.cchSettlemd,
            cchRemark: data.cchRemark,
            cchFltId: store.state.user.FLT_UUID_DX_H,
            cchLstupduser: store.state.user.USR_CODE_DX_H,
          }
        },
      }
    }
  )

// 获取 协议费率 编辑
export const delAgreeRateService = (data) =>
  post(
    '/FTKJWLHYPT/SysResultsFees/delConsultativeChargesList',
    {
      Data: {
        Parameters: {
          FTKJWLHYPT: {
            cchId: data.cchId,
          }
        },
      }
    }
  )
